#!/bin/sh
# /etc/init.d/tightvncserver
# Set the VNCUSER variable to the name of the user to start tightvncserver unde\
r
VNCUSER='pi'
case "$1" in
    start)
        su $VNCUSER -c '/usr/bin/vncserver :1 -geometry 1440x900'
        echo "Starting TightVNC server for $VNCUSER"
        ;;
    stop)
        pkill Xtightvnc
        echo "Tightvncserver stopped"
        ;;
    *)
        echo "Usage: /etc/init.d/vncserver {start|stop}"
        exit 1
        ;;
esac
exit 0


